home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / ObjectTcl-1.1 / examples / Simple / A.C < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-30  |  344 b   |  34 lines

  1. #include <iostream.h>
  2. #include "A.H"
  3.  
  4. // File A.C
  5.  
  6. A::A (A *n)
  7. {
  8.    next = n;
  9.    cout << "A::constructed" << endl;
  10. }
  11.  
  12. A::~A ()
  13. {
  14.    cout << "A::destructed" << endl;
  15. }
  16.  
  17. void A::doIt (void)
  18. {
  19.    cout << "A::doIt" << endl;
  20. }
  21.  
  22. void A::setNext (A *n)
  23. {
  24.    next = n;
  25. }
  26.  
  27. void A::doItNext (void)
  28. {
  29.    if (next != NULL)
  30.    { 
  31.       next->doIt();
  32.    }
  33. }
  34.